
package second;

public class Student {
	String Scode,Sname,Ssex;
	Course[] SC = new Course[100];
	Student(String sco,String sna,String sse){
	}
	void printStudent() {
		System.out.println(this.Scode+" "+this.Sname+" "+this.Ssex);
	}
	
	
	void addSCourse(Course c) {
		for (int i=0;i<=SC.length-1;i++) {
			if (SC[i] != null && i == SC.length-1)
				break;
			if (SC[i] == null) {
				SC[i] = c;
				break;
 			}
		}
	}
	void deleteCourse(Course c) {
		for(int j=0;j<=SC.length-1;j++) {
			if(SC[j] != null) {
				if(SC[j].classname == c.classname) {
					SC[j] = null;
					break;
				}
			}
		}
	}

	void printSC() {
		System.out.println("********ѧ"+this.Sname+"Ŀα********\n");
		for(int i=0;i<=this.SC.length-1;i++) {
			if(this.SC[i] != null) {
				this.SC[i].printCourse();
			}
		}
	}
}